Virtualization allows, among other things, many computing environments, such as general desktop environments, database servers, web development platforms, etc., to be implemented through software as virtual machines within host computing devices. A virtual machine may comprise its own file structure, virtual hard disks, partitions, operating system, applications, data files and/or configuration. As such, the virtual machine may function as a self-contained computing environment. The virtual machine may be an abstraction of the underlying hardware resources (e.g., a virtual machine may be stored as one or more virtual data objects within physical storage). That is, the virtual machine may be a software implementation of a physical computing machine that has normal operational functionality of the physical computing machine. For example, a host computing device may comprise virtual machine host software (e.g., a hypervisor) configured to host and manage virtual machines. The virtual machine host software may allow a user to interface to and interact with a hosted virtual machine. For example, the user may interact with the guest operating system and/or applications of the hosted virtual machine through the virtual machine host software.
A virtual machine may be stored as one or more virtual data objects within physical storage and/or virtualized storage, such as a logical unit number (LUN), of an underlying storage device. A virtual data object may comprise virtual storage, such as a virtual hard disk (e.g., a virtual machine disk format (.vmdk), a virtual hard disk (.vdh) file format, etc.). The virtual storage may comprise virtual machine data, such as a file system guest operating system and/or user data of the virtual machine. The virtual storage may be a level of abstraction from the underlying storage because the virtual storage may store the virtual machine data according to a virtual data format that may not be dependent upon an underlying data format of the underling storage. For example, a guest operating system of a virtual machine may store a user created text document according to a virtual data format within a virtual hard disk of a virtual data object (e.g., the user created text document may be stored within virtual data blocks of 512 bytes). The virtual data format may be independent of an underlying data format used by a storage device to store the virtual data object (e.g., the virtual data object may be stored within physical data blocks of 4096 bytes). That is, the virtual data format (e.g., how virtual machine data is stored within a virtual data object) may be a level of abstraction from an underlying data format (e.g., how the virtual data object is stored within an underlying physical storage device).
Virtualization also allows for storage virtualization. For example, a virtual volume may be created from various available portions of one or more physical storage locations (e.g., a virtual volume may be comprised of space from a first physical disk, a second physical disk, etc.). Thus, the virtual volume may not be “tied” to a particular storage device, and can be said to include a layer of abstraction or virtualization. Further, a virtual volume may comprise one or more logical unit numbers (LUNs). LUNs may allow disparate memory located within data storage to be grouped as a data storage unit. As such, a LUN may be characterized as comprising a virtual disk or drive upon which data within a virtual volume may be stored within the aggregate. For example, a LUN may be referred to as a virtual drive, such that it may emulate a hard drive from a general purpose computer, while the LUN actually comprises one or more data storage blocks in various physical storage devices and/or volumes. In this way, a LUN may store data according to a virtual data format, which may be independent from an underlying data format used by a storage device to store the LUN.
Unfortunately, storing virtualized data, such as a virtual machine or a LUN, within underlying data storage may result in misalignment. For example, a guest operating system of a virtual machine may store virtual machine data according to a virtual data format within the virtual data object (e.g., the virtual data format may specify that a virtual file system of the virtual machine stores data within 512 byte blocks, and a first virtual hard drive partition starts at an offset of 63 blocks within the virtual data object). However, the virtual data object may be stored within a storage device (e.g., within physical storage and/or a LUN) according to an underlying data format (e.g., the virtual data object may be stored within physical data blocks of 4096 bytes). If the virtual data format and the underlying data format align, then virtual data blocks may be stored within corresponding underlying storage data blocks without overlapping into additional underlying storage data blocks (e.g., virtual data blocks may span no more than one underlying storage data block). If the virtual data format and the underlying data format do not align, however, then virtual data blocks may end up being stored across one or more additional underlying storage data blocks (e.g., a virtual data block may span more than one underlying storage block). Thus, if a virtual data block is misaligned, then an I/O operation for the virtual data block may entail accessing more than one underlying storage data block (e.g., a first portion of the virtual data block may be read from a first underlying storage data block and a second portion of the virtual data block may be read from a second underlying storage data block). Such additional I/O operations may result in performance degradation. For example, access to a guest operating system and/or user data of a virtual machine may take twice as long because more than one I/O operation to underlying data storage may be performed to access a single virtual data block due to the misalignment.